#! /bin/sh

# Generate new CA certificate root-ca.pem file.

OPENSSL_ROOT_CA=$1

echo ">>> Gen Root CA:"
echo

openssl genrsa 2048 > certs/root-ca-key.pem


openssl req -new -x509 -nodes -days 3600 \
    -subj "${OPENSSL_ROOT_CA}" \
    -key certs/root-ca-key.pem -out certs/root-ca.pem

echo
